package de.hsowl.tod4a.global.model;

/**
 * Basic configuration class for the Server
 * 
 * @author Sebastian Witt
 * 
 */
public class ServerProperty {

	/**
	 * Specifies the listening port of the server
	 */
	public int PORT = 3366;
	/**
	 * How many parallel conections are allowed
	 */
	public int MAX_CONNECTIONS = 5;
	/**
	 * Shall a server start?
	 */
	public boolean START_SERVER = true;
	/**
	 * Compressing database?
	 */
	public boolean COMPRESS = false;
	/**
	 * Encrypting database?
	 */
	public boolean ENCRYPT = false;
	/**
	 * Enctryption key
	 */
	public String KEY = null;

	public ServerProperty() {
	}

	/**
	 * Returns the default Property object for the server
	 * 
	 * @return
	 */
	public static ServerProperty getDefaultProperty() {
		final ServerProperty p = new ServerProperty();
		p.PORT = 3366;
		p.MAX_CONNECTIONS = 5;
		p.START_SERVER = true;
		p.ENCRYPT = false;
		p.COMPRESS = false;
		return p;
	}

	public int getPORT() {
		return PORT;
	}

	public void setPORT(int pORT) {
		PORT = pORT;
	}

	public int getMAX_CONNECTIONS() {
		return MAX_CONNECTIONS;
	}

	public void setMAX_CONNECTIONS(int mAX_CONNECTIONS) {
		MAX_CONNECTIONS = mAX_CONNECTIONS;
	}

	public boolean isSTART_SERVER() {
		return START_SERVER;
	}

	public void setSTART_SERVER(boolean sTART_SERVER) {
		START_SERVER = sTART_SERVER;
	}

	public boolean isCOMPRESS() {
		return COMPRESS;
	}

	public void setCOMPRESS(boolean cOMPRESS) {
		COMPRESS = cOMPRESS;
	}

	public boolean isENCRYPT() {
		return ENCRYPT;
	}

	public void setENCRYPT(boolean eNCRYPT) {
		ENCRYPT = eNCRYPT;
	}

	public String getKEY() {
		return KEY;
	}

	public void setKEY(String kEY) {
		KEY = kEY;
	}
}
